package com.smartscreen.baseinfomanage.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.time.LocalDateTime;
import java.util.List;

@TableName("academic_year")
public class AcademicYear {
    @TableId
    private String yearId;
    
    private String name;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    @TableField(exist = false)
    private List<Term> terms;

    public AcademicYear() {}

    public AcademicYear(String yearId, String name, List<Term> terms) {
        this.yearId = yearId;
        this.name = name;
        this.terms = terms;
    }

    // Getters and Setters
    public String getYearId() { return yearId; }
    public void setYearId(String yearId) { this.yearId = yearId; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public List<Term> getTerms() { return terms; }
    public void setTerms(List<Term> terms) { this.terms = terms; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
}